<?php 
require_once '../../config.php';
//接收传过来的邮箱
//找到这个邮箱对应的头像
//echo
if(empty($_GET['email'])){
    exit('缺少必要的参数');
}
$email=$_GET['email'];
$conn=mysqli_connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);
if(!$conn){
    exit('数据库连接失败');
}
$query=mysqli_query($conn,"select avatar from users where email='{$email}' limit 1;");
if(!$query){
    exit('查询失败');
}
$row=mysqli_fetch_assoc($query);
//header( 'Content-Type:text/html;charset=utf-8 '); 
echo $row['avatar'];






 ?>